import * as type from '../mutationType'

const state = {
    loading: false
};

const getters = {
    getLoading: state => state.loading
};

const actions = {
    setLoadingState({commit}, state) {
        commit(type.SET_LOADING_STATE, state)
    }
};

const mutations = {
    [type.SET_LOADING_STATE](state, setting){
        state.loading = setting
    }
};

export default {
    state,
    getters,
    actions,
    mutations
}

